import config from "@/config"
import http from "@/utils/request"

export default {
	invite: {
		list: {
			url: `${config.API_URL}/invitationCodeRecord/userList`,
			name: "获取邀请码列表",
			post: async function (data) {
				return await http.post(this.url, data);
			}
		}
	},
	event: {
		list: {
			url: `${config.API_URL}/event/list`,
			name: "获取模块列表",
			post: async function (data) {
				return await http.post(this.url, data);
			}
		},
		save: {
			url: `${config.API_URL}/event/save`,
			name: "新增或编辑模板",
			post: async function (data) {
				return await http.post(this.url, data);
			}
		},
		update: {
			url: `${config.API_URL}/event/update`,
			name: "启动/停用模板",
			post: async function (data) {
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/event/delete`,
			name: "删除模板",
			get: async function (id) {
				return await http.get(this.url + `/${id}`);
			}
		}
	},
	order: {
		transactionRecord: {
			url: `${config.API_URL}/passOn/transactionRecord`,
			name: "获取查询交易记录",
			post: async function (data) {
				return await http.post(this.url, data);
			}
		}
	},
}
